using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using OneSoft.EntityCore;
using OneSoft.DataAccess;
using BySoft.Server.Common.Entity;
using BySoft.Server.Common.Schema;

namespace BySoft.Server.DataAccess
{
    public partial class MdKnifetypeDA
	{
		

        private static string GetHeadSQL()
        {
            return @"SELECT A.*
                    FROM MD_KnifeType A 
                    WHERE 1=1";
        }
        public static DataTable SelectList( string strKnifeTypeName,  int pageIndex, int pageSize, out int count)
        {
            try
            {
                #region SQL Server
                string strcmd = GetHeadSQL();

                DataAccessParameterCollection dpc = new DataAccessParameterCollection();

               

                if (!string.IsNullOrEmpty(strKnifeTypeName))
                {
                    strcmd += " and A.KnifeTypeName LIKE @KnifeTypeName";
                    dpc.AddWithValue("@KnifeTypeName", "%" + strKnifeTypeName + "%");
                }
              

                strcmd += " ORDER BY A.KnifeTypeID DESC";

                return DataAccessCommon.ExecuteDataTablePaging(strcmd, pageIndex, pageSize, dpc, out count);
                #endregion
            }
            catch
            {
                throw;
            }
        }

      
    }
}

